Skip to main content

Response from server

Overview

This section details the standard responses that the API can return. Each response is associated with an HTTP status code that indicates the result of the request.

1. 200 OK

Description: The request has succeeded. The information returned with the response is dependent on the method used in the request.

Example Response:

{
"status": 200,
"message": "report ghosting done"
}

2. 400 Bad Request

Description: The server cannot or will not process the request due to something that is perceived to be a client error.

Example Response:

{
"status": "error",
"message": "Invalid request parameters."
}

3. 403 Forbidden

Description: The server understood the request but refuses to authorize it.

Example Response:

{
"status": "error",
"message": "You do not have permission to access this resource."
}

4. 404 Not Found

Description: The server can not find the requested resource.

Example Response:

{
"status": "error",
"message": "Resource not found."
}

5. 500 Internal Server Error

Description: The server encountered an unexpected condition that prevented it from fulfilling the request.

Example Response:

{
"status": "error",
"message": "Internal server error. Please try again later."
}

6. 502 Bad Gateway

Description: The server was acting as a gateway or proxy and received an invalid response from the upstream server.

Example Response:

{
"status": "error",
"message": "Bad gateway. Please try again later."
}